package tt.dz.appserver.service.avro.client.car;

import org.apache.avro.AvroRemoteException;
import org.apache.avro.Protocol;
import org.apache.avro.specific.AvroGenerated;

import tt.dz.appserver.util.resource.ResourceUtils;

@AvroGenerated
public interface DzVehicleInternetRPCProtocol {
	
	public static final Protocol PROTOCOL = Protocol.parse(ResourceUtils.getRootResource("avro/car/vehicleAvro.json"));

	/**
	 * 车辆列表查询
	 * @param req
	 * @return
	 * @throws AvroRemoteException
	 */
	CharSequence queryVehicleList() throws AvroRemoteException;
	
	/**
	 * 查询车辆支持的控制命令
	 * <p>备注：直接传字符串，不需要封装JSON转换
	 * @param req
	 * @return 
	 * @throws AvroRemoteException
	 */
	CharSequence queryVehicleSupportedCmd(CharSequence req) throws AvroRemoteException;
	
	/**
	 * 用户发送远程控制命令
	 * @param req
	 * @return
	 * @throws AvroRemoteException
	 */
	CharSequence sendRemoteCmd(CharSequence req) throws AvroRemoteException;
	
	/**
	 * <p>查询车辆位置信息
	 * @param req
	 * @return
	 * @throws AvroRemoteException
	 */
	CharSequence queryVehicleLocation(CharSequence req) throws AvroRemoteException;
	
	/**
	 * 查询某辆车的行驶数据
	 * @param req
	 * @return
	 * @throws AvroRemoteException
	 */
	CharSequence getVehicleRunningData(CharSequence req) throws AvroRemoteException;

}